<template>
  <div class="userActivityDetail">
    <div class="activityTable">
      <el-form :model="activityTable"
               ref="activityTable"
               label-width="120px"
               class="demo-ruleForm"
               size="mini"
               :disabled="true">
        <el-form-item  label="活动标题" prop="activityTitle">
          <el-input  v-model="activityTable.activity.activityTitle"></el-input>
        </el-form-item>
        <el-form-item  label="活动类型" prop="activityType">
          <el-input  v-model="activityTable.activity.activityType"></el-input>
        </el-form-item>
        <el-form-item label="活动地点" prop="activityPlace">
          <el-input v-model="activityTable.activity.activityPlace"></el-input>
        </el-form-item>
        <el-form-item label="活动开始时间" prop="activityStarttime">
          <el-input v-model="activityTable.activity.activityStarttime"></el-input>
        </el-form-item>
        <el-form-item label="活动结束时间" prop="activityEndtime">
          <el-input v-model="activityTable.activity.activityEndtime"></el-input>
        </el-form-item>
        <el-form-item label="报名时间" prop="registrationTime">
          <el-input v-model="activityTable.registrationTime"></el-input>
        </el-form-item>
        <el-form-item label="用户补充内容" prop="registrationContent">
          <el-input type="textarea"  v-model="activityTable.registrationContent"></el-input>
        </el-form-item>

      </el-form>
    </div>
  </div>
</template>

<script>
import {getRegistrationByRegistrationId} from "@/api/allApi";
import moment from "moment";

export default {

  data() {
    return{
      activityTable:{},
    }
  },
  methods:{
    getRegistrationByRegistrationId() {
      getRegistrationByRegistrationId(this.$route.params.registrationId).then(res=>{
        if (res.data.success) {
          this.activityTable = res.data.data
          // 修改表单时间
          this.activityTable.activity.activityStarttime = moment(this.activityTable.activity.activityStarttime).format("YYYY-MM-DD HH:mm:ss")
          this.activityTable.activity.activityEndtime = moment(this.activityTable.activity.activityEndtime).format("YYYY-MM-DD HH:mm:ss")
          this.activityTable.registrationTime = moment(this.activityTable.registrationTime).format("YYYY-MM-DD HH:mm:ss")
        }
      })
    }
  },
  mounted() {
    this.getRegistrationByRegistrationId()
  }

}
</script>

<style scoped>

</style>